
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <div class="breadcrumb_wrap">
        <ul class="breadcrumb">
            <li>您的位置：</li>
            <li> <a href="coupon_list.html">优惠券</a> <span class="divider">></span> </li>
            <li class="active">列表</li>
        </ul>
    </div>
    <ul id="myTab" class="nav nav-tabs pro_nav_tabs">
        <li  class="active"> <a href="/xdd/common/coupon/list" >优惠券</a> </li>
    </ul>
    <div class="select_box " >
        <form class="form-horizontal" role="form">
            <div class="form-group col-md-4">
                <label class="control-label">优惠券名称：</label>
                <input type="text" class="form-control" ng-model="param.title">
            </div>

            <div class="form-group col-md-4">
                <label class="control-label">满减金额/元：</label>
                <input type="text" class="form-control" ng-model="param.dealPrice">
            </div>
            <div class="form-group col-md-4">
                <label class="control-label">优惠金额/元：</label>
                <input type="text" class="form-control" ng-model="param.discountPrice">
            </div>
            <!--<div class="form-group col-md-4">
                <label class="control-label">开始日期：</label>
                <input type="text" class="form-control" placeholder="&#45;&#45;请选择&#45;&#45;">
                <i class="glyphicon glyphicon-calendar"></i>
            </div>
            <div class="form-group col-md-4">
                <label class="control-label">结束日期：</label>
                <input type="text" class="form-control" placeholder="&#45;&#45;请选择&#45;&#45;">
                <i class="glyphicon glyphicon-calendar"></i>
            </div>-->
            <div class="form-group col-md-4">
                <label class="control-label">状态：</label>
                <label class="radio-inline">
                    <input type="radio" name="optionsRadiosinline" id="optionsRadios3" ng-value="true"  ng-model="param.ifCanUse">
                    有效</label>
                <label class="radio-inline">
                    <input type="radio" name="optionsRadiosinline" id="optionsRadios4"  ng-value="false" ng-model="param.ifCanUse">
                    过期</label>
            </div>
            <div class="form-group col-md-4 button_box ">
                <button type="button" class="btn btn-primary" ng-click="paramSearch()"><i class="glyphicon glyphicon-search"></i>搜索</button>
            </div>
        </form>
    </div>
    <div class="button_box table_btn_box">
        <button type="button" class="btn btn-primary btn_add" ng-click="addCoupon()"><i class="glyphicon glyphicon-plus"></i>新增</button>
    </div>
    <div class="table-responsive con_list">
        <table class="table table-striped">
            <thead>
            <tr>
                <th>编号</th>
                <th>优惠券名称：</th>
                <th>满减金额/元：</th>
                <th>优惠金额/元：</th>
                <th>开始日期</th>
                <th>结束日期</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="coupon in couponList">
                <td>{{$index+1}}</td>
                <td>{{coupon.title}}</td>
                <td>{{coupon.dealPrice}}</td>
                <td>{{coupon.discountPrice}}</td>
                <td>{{coupon.startDate|dateStr:'yyyy-mm-dd HH:mm:ss'}}</td>
                <td>{{coupon.endDate|dateStr:'yyyy-mm-dd HH:mm:ss'}}</td>
                <td ng-if="coupon.ifCanUse"><span class="state">有效</span></td>
                <td ng-if="!coupon.ifCanUse"><span class="state down">过期</span></td>
                <td class="ops">
                    <a href="/xdd/common/coupon/setting/{{coupon.id}}"><button type="button" class="btn btn-primary editor">发放</button></a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <div class="page_wrap">
        <div class="text-center scott">
            <uib-pagination  total-items="totalItems" ng-model="currentPage" boundary-links="true" max-size="5"   ng-change="pageChanged()" items-per-page="itemsPerPage" previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
        </div>
    </div>
</div>